#include "financequerytableview.h"

FinanceQueryTableView::FinanceQueryTableView(QWidget *parent) : MyTableView(parent)
{
    setSortingEnabled(true);
    model = new FinanceQueryStandardItemModel();
    setModel(model);

    setEditTriggers(QAbstractItemView::NoEditTriggers);
}

void FinanceQueryTableView::setType(int type){
    model->setType(type);
}

void FinanceQueryTableView::clear(){
    model->reset();
}

void FinanceQueryTableView::setListPushButton(MultiListPushButton *multiListPushButton){
    setMultiListPushButton(multiListPushButton);

    addMultiMenu("financeQuery/type1", model->header1);
    addMultiMenu("financeQuery/type2", model->header2);
}

void FinanceQueryTableView::insertMessage(QList<Message*> messages){
    model->insertMessage(messages);
}
